Revenue policies
Create revenue policy
Create a revenue policy on a ledger with its draft version 1, to publish before it governs any contract; its priority must be unique among the ledger’s live policies.
POST
/
v1
/
accounting
/
revenue-policies
Create revenue policy
curl --request POST \
--url https://api.hyperline.co/v1/accounting/revenue-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ledger_id": "led_8Hq2nZ0kLm4x1P",
"name": "Enterprise contracts",
"priority": 10,
"match_conditions": {
"customer_ids": [
"<string>"
],
"currencies": [
"EUR"
],
"countries": [
"FR"
],
"product_ids": [
"<string>"
],
"customer_segment_ids": [],
"custom_property_filters": []
},
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {},
"obligations": {
"mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"product_ids": [
"<string>"
]
}
]
},
"allocation": {
"catalog_price_fallback": true
},
"recognition": {
"consumption": {
"breakage": "recognize_at_expiry"
},
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {},
"modifications": {}
},
"description": "<string>"
}
'import requests
url = "https://api.hyperline.co/v1/accounting/revenue-policies"
payload = {
"ledger_id": "led_8Hq2nZ0kLm4x1P",
"name": "Enterprise contracts",
"priority": 10,
"match_conditions": {
"customer_ids": ["<string>"],
"currencies": ["EUR"],
"countries": ["FR"],
"product_ids": ["<string>"],
"customer_segment_ids": [],
"custom_property_filters": []
},
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {},
"obligations": { "mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"product_ids": ["<string>"]
}
] },
"allocation": { "catalog_price_fallback": True },
"recognition": {
"consumption": { "breakage": "recognize_at_expiry" },
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {},
"modifications": {}
},
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ledger_id: 'led_8Hq2nZ0kLm4x1P',
name: 'Enterprise contracts',
priority: 10,
match_conditions: {
customer_ids: ['<string>'],
currencies: ['EUR'],
countries: ['FR'],
product_ids: ['<string>'],
customer_segment_ids: [],
custom_property_filters: []
},
effective_from: '2026-01-01T00:00:00Z',
config: {
eligibility: {},
obligations: {
mappings: [
{
key: 'platform',
name: '<string>',
kind: 'service_period',
product_ids: ['<string>']
}
]
},
allocation: {catalog_price_fallback: true},
recognition: {
consumption: {breakage: 'recognize_at_expiry'},
default_accounts: {
deferred_revenue_ledger_account_id: '<string>',
unbilled_revenue_ledger_account_id: '<string>'
}
},
review: {},
modifications: {}
},
description: '<string>'
})
};
fetch('https://api.hyperline.co/v1/accounting/revenue-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperline.co/v1/accounting/revenue-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ledger_id' => 'led_8Hq2nZ0kLm4x1P',
'name' => 'Enterprise contracts',
'priority' => 10,
'match_conditions' => [
'customer_ids' => [
'<string>'
],
'currencies' => [
'EUR'
],
'countries' => [
'FR'
],
'product_ids' => [
'<string>'
],
'customer_segment_ids' => [
],
'custom_property_filters' => [
]
],
'effective_from' => '2026-01-01T00:00:00Z',
'config' => [
'eligibility' => [
],
'obligations' => [
'mappings' => [
[
'key' => 'platform',
'name' => '<string>',
'kind' => 'service_period',
'product_ids' => [
'<string>'
]
]
]
],
'allocation' => [
'catalog_price_fallback' => true
],
'recognition' => [
'consumption' => [
'breakage' => 'recognize_at_expiry'
],
'default_accounts' => [
'deferred_revenue_ledger_account_id' => '<string>',
'unbilled_revenue_ledger_account_id' => '<string>'
]
],
'review' => [
],
'modifications' => [
]
],
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperline.co/v1/accounting/revenue-policies"
payload := strings.NewReader("{\n \"ledger_id\": \"led_8Hq2nZ0kLm4x1P\",\n \"name\": \"Enterprise contracts\",\n \"priority\": 10,\n \"match_conditions\": {\n \"customer_ids\": [\n \"<string>\"\n ],\n \"currencies\": [\n \"EUR\"\n ],\n \"countries\": [\n \"FR\"\n ],\n \"product_ids\": [\n \"<string>\"\n ],\n \"customer_segment_ids\": [],\n \"custom_property_filters\": []\n },\n \"effective_from\": \"2026-01-01T00:00:00Z\",\n \"config\": {\n \"eligibility\": {},\n \"obligations\": {\n \"mappings\": [\n {\n \"key\": \"platform\",\n \"name\": \"<string>\",\n \"kind\": \"service_period\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"allocation\": {\n \"catalog_price_fallback\": true\n },\n \"recognition\": {\n \"consumption\": {\n \"breakage\": \"recognize_at_expiry\"\n },\n \"default_accounts\": {\n \"deferred_revenue_ledger_account_id\": \"<string>\",\n \"unbilled_revenue_ledger_account_id\": \"<string>\"\n }\n },\n \"review\": {},\n \"modifications\": {}\n },\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperline.co/v1/accounting/revenue-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ledger_id\": \"led_8Hq2nZ0kLm4x1P\",\n \"name\": \"Enterprise contracts\",\n \"priority\": 10,\n \"match_conditions\": {\n \"customer_ids\": [\n \"<string>\"\n ],\n \"currencies\": [\n \"EUR\"\n ],\n \"countries\": [\n \"FR\"\n ],\n \"product_ids\": [\n \"<string>\"\n ],\n \"customer_segment_ids\": [],\n \"custom_property_filters\": []\n },\n \"effective_from\": \"2026-01-01T00:00:00Z\",\n \"config\": {\n \"eligibility\": {},\n \"obligations\": {\n \"mappings\": [\n {\n \"key\": \"platform\",\n \"name\": \"<string>\",\n \"kind\": \"service_period\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"allocation\": {\n \"catalog_price_fallback\": true\n },\n \"recognition\": {\n \"consumption\": {\n \"breakage\": \"recognize_at_expiry\"\n },\n \"default_accounts\": {\n \"deferred_revenue_ledger_account_id\": \"<string>\",\n \"unbilled_revenue_ledger_account_id\": \"<string>\"\n }\n },\n \"review\": {},\n \"modifications\": {}\n },\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/accounting/revenue-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ledger_id\": \"led_8Hq2nZ0kLm4x1P\",\n \"name\": \"Enterprise contracts\",\n \"priority\": 10,\n \"match_conditions\": {\n \"customer_ids\": [\n \"<string>\"\n ],\n \"currencies\": [\n \"EUR\"\n ],\n \"countries\": [\n \"FR\"\n ],\n \"product_ids\": [\n \"<string>\"\n ],\n \"customer_segment_ids\": [],\n \"custom_property_filters\": []\n },\n \"effective_from\": \"2026-01-01T00:00:00Z\",\n \"config\": {\n \"eligibility\": {},\n \"obligations\": {\n \"mappings\": [\n {\n \"key\": \"platform\",\n \"name\": \"<string>\",\n \"kind\": \"service_period\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"allocation\": {\n \"catalog_price_fallback\": true\n },\n \"recognition\": {\n \"consumption\": {\n \"breakage\": \"recognize_at_expiry\"\n },\n \"default_accounts\": {\n \"deferred_revenue_ledger_account_id\": \"<string>\",\n \"unbilled_revenue_ledger_account_id\": \"<string>\"\n }\n },\n \"review\": {},\n \"modifications\": {}\n },\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "rpol_3fJ8kZx1Lq9a2B",
"ledger_id": "led_8Hq2nZ0kLm4x1P",
"name": "Enterprise contracts",
"description": "<string>",
"priority": 10,
"match_conditions": {
"customer_ids": [
"<string>"
],
"currencies": [
"EUR"
],
"countries": [
"FR"
],
"product_ids": [
"<string>"
],
"customer_segment_ids": [
"seg_7Gk2Lm9xQ1z4Ha"
],
"custom_property_filters": [
{
"custom_field_id": "cfi_9xQ1z4Ha7Gk2Lm",
"values": [
"enterprise"
]
}
]
},
"published_version": {
"id": "rpv_7Gk2Lm9xQ1z4Ha",
"version": 1,
"status": "draft",
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {
"collectability": "assumed"
},
"obligations": {
"mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"treatment": "allocated",
"granularity": "day",
"product_ids": [
"<string>"
]
}
],
"unmapped_products": "own_obligation"
},
"allocation": {
"method": "relative_ssp",
"catalog_price_fallback": true,
"discounts": "proportional"
},
"recognition": {
"consumption": {
"breakage": "recognize_at_expiry"
},
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {
"mode": "exceptions_and_overrides"
},
"modifications": {
"amendment": "prospective",
"cancellation": "prospective"
}
},
"published_at": "2024-12-20T16:04:11Z",
"published_by_user_id": "<string>",
"created_at": "2024-12-20T16:04:11Z"
},
"draft_version": {
"id": "rpv_7Gk2Lm9xQ1z4Ha",
"version": 1,
"status": "draft",
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {
"collectability": "assumed"
},
"obligations": {
"mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"treatment": "allocated",
"granularity": "day",
"product_ids": [
"<string>"
]
}
],
"unmapped_products": "own_obligation"
},
"allocation": {
"method": "relative_ssp",
"catalog_price_fallback": true,
"discounts": "proportional"
},
"recognition": {
"consumption": {
"breakage": "recognize_at_expiry"
},
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {
"mode": "exceptions_and_overrides"
},
"modifications": {
"amendment": "prospective",
"cancellation": "prospective"
}
},
"published_at": "2024-12-20T16:04:11Z",
"published_by_user_id": "<string>",
"created_at": "2024-12-20T16:04:11Z"
},
"assessment_count": 123,
"archived_at": "2024-12-20T16:04:11Z",
"created_at": "2024-12-20T16:04:11Z",
"versions": [
{
"id": "rpv_7Gk2Lm9xQ1z4Ha",
"version": 1,
"status": "draft",
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {
"collectability": "assumed"
},
"obligations": {
"mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"treatment": "allocated",
"granularity": "day",
"product_ids": [
"<string>"
]
}
],
"unmapped_products": "own_obligation"
},
"allocation": {
"method": "relative_ssp",
"catalog_price_fallback": true,
"discounts": "proportional"
},
"recognition": {
"consumption": {
"breakage": "recognize_at_expiry"
},
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {
"mode": "exceptions_and_overrides"
},
"modifications": {
"amendment": "prospective",
"cancellation": "prospective"
}
},
"published_at": "2024-12-20T16:04:11Z",
"published_by_user_id": "<string>",
"created_at": "2024-12-20T16:04:11Z"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json
Response
Was this page helpful?
⌘I
Create revenue policy
curl --request POST \
--url https://api.hyperline.co/v1/accounting/revenue-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ledger_id": "led_8Hq2nZ0kLm4x1P",
"name": "Enterprise contracts",
"priority": 10,
"match_conditions": {
"customer_ids": [
"<string>"
],
"currencies": [
"EUR"
],
"countries": [
"FR"
],
"product_ids": [
"<string>"
],
"customer_segment_ids": [],
"custom_property_filters": []
},
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {},
"obligations": {
"mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"product_ids": [
"<string>"
]
}
]
},
"allocation": {
"catalog_price_fallback": true
},
"recognition": {
"consumption": {
"breakage": "recognize_at_expiry"
},
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {},
"modifications": {}
},
"description": "<string>"
}
'import requests
url = "https://api.hyperline.co/v1/accounting/revenue-policies"
payload = {
"ledger_id": "led_8Hq2nZ0kLm4x1P",
"name": "Enterprise contracts",
"priority": 10,
"match_conditions": {
"customer_ids": ["<string>"],
"currencies": ["EUR"],
"countries": ["FR"],
"product_ids": ["<string>"],
"customer_segment_ids": [],
"custom_property_filters": []
},
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {},
"obligations": { "mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"product_ids": ["<string>"]
}
] },
"allocation": { "catalog_price_fallback": True },
"recognition": {
"consumption": { "breakage": "recognize_at_expiry" },
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {},
"modifications": {}
},
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ledger_id: 'led_8Hq2nZ0kLm4x1P',
name: 'Enterprise contracts',
priority: 10,
match_conditions: {
customer_ids: ['<string>'],
currencies: ['EUR'],
countries: ['FR'],
product_ids: ['<string>'],
customer_segment_ids: [],
custom_property_filters: []
},
effective_from: '2026-01-01T00:00:00Z',
config: {
eligibility: {},
obligations: {
mappings: [
{
key: 'platform',
name: '<string>',
kind: 'service_period',
product_ids: ['<string>']
}
]
},
allocation: {catalog_price_fallback: true},
recognition: {
consumption: {breakage: 'recognize_at_expiry'},
default_accounts: {
deferred_revenue_ledger_account_id: '<string>',
unbilled_revenue_ledger_account_id: '<string>'
}
},
review: {},
modifications: {}
},
description: '<string>'
})
};
fetch('https://api.hyperline.co/v1/accounting/revenue-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperline.co/v1/accounting/revenue-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ledger_id' => 'led_8Hq2nZ0kLm4x1P',
'name' => 'Enterprise contracts',
'priority' => 10,
'match_conditions' => [
'customer_ids' => [
'<string>'
],
'currencies' => [
'EUR'
],
'countries' => [
'FR'
],
'product_ids' => [
'<string>'
],
'customer_segment_ids' => [
],
'custom_property_filters' => [
]
],
'effective_from' => '2026-01-01T00:00:00Z',
'config' => [
'eligibility' => [
],
'obligations' => [
'mappings' => [
[
'key' => 'platform',
'name' => '<string>',
'kind' => 'service_period',
'product_ids' => [
'<string>'
]
]
]
],
'allocation' => [
'catalog_price_fallback' => true
],
'recognition' => [
'consumption' => [
'breakage' => 'recognize_at_expiry'
],
'default_accounts' => [
'deferred_revenue_ledger_account_id' => '<string>',
'unbilled_revenue_ledger_account_id' => '<string>'
]
],
'review' => [
],
'modifications' => [
]
],
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperline.co/v1/accounting/revenue-policies"
payload := strings.NewReader("{\n \"ledger_id\": \"led_8Hq2nZ0kLm4x1P\",\n \"name\": \"Enterprise contracts\",\n \"priority\": 10,\n \"match_conditions\": {\n \"customer_ids\": [\n \"<string>\"\n ],\n \"currencies\": [\n \"EUR\"\n ],\n \"countries\": [\n \"FR\"\n ],\n \"product_ids\": [\n \"<string>\"\n ],\n \"customer_segment_ids\": [],\n \"custom_property_filters\": []\n },\n \"effective_from\": \"2026-01-01T00:00:00Z\",\n \"config\": {\n \"eligibility\": {},\n \"obligations\": {\n \"mappings\": [\n {\n \"key\": \"platform\",\n \"name\": \"<string>\",\n \"kind\": \"service_period\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"allocation\": {\n \"catalog_price_fallback\": true\n },\n \"recognition\": {\n \"consumption\": {\n \"breakage\": \"recognize_at_expiry\"\n },\n \"default_accounts\": {\n \"deferred_revenue_ledger_account_id\": \"<string>\",\n \"unbilled_revenue_ledger_account_id\": \"<string>\"\n }\n },\n \"review\": {},\n \"modifications\": {}\n },\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperline.co/v1/accounting/revenue-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ledger_id\": \"led_8Hq2nZ0kLm4x1P\",\n \"name\": \"Enterprise contracts\",\n \"priority\": 10,\n \"match_conditions\": {\n \"customer_ids\": [\n \"<string>\"\n ],\n \"currencies\": [\n \"EUR\"\n ],\n \"countries\": [\n \"FR\"\n ],\n \"product_ids\": [\n \"<string>\"\n ],\n \"customer_segment_ids\": [],\n \"custom_property_filters\": []\n },\n \"effective_from\": \"2026-01-01T00:00:00Z\",\n \"config\": {\n \"eligibility\": {},\n \"obligations\": {\n \"mappings\": [\n {\n \"key\": \"platform\",\n \"name\": \"<string>\",\n \"kind\": \"service_period\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"allocation\": {\n \"catalog_price_fallback\": true\n },\n \"recognition\": {\n \"consumption\": {\n \"breakage\": \"recognize_at_expiry\"\n },\n \"default_accounts\": {\n \"deferred_revenue_ledger_account_id\": \"<string>\",\n \"unbilled_revenue_ledger_account_id\": \"<string>\"\n }\n },\n \"review\": {},\n \"modifications\": {}\n },\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/accounting/revenue-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ledger_id\": \"led_8Hq2nZ0kLm4x1P\",\n \"name\": \"Enterprise contracts\",\n \"priority\": 10,\n \"match_conditions\": {\n \"customer_ids\": [\n \"<string>\"\n ],\n \"currencies\": [\n \"EUR\"\n ],\n \"countries\": [\n \"FR\"\n ],\n \"product_ids\": [\n \"<string>\"\n ],\n \"customer_segment_ids\": [],\n \"custom_property_filters\": []\n },\n \"effective_from\": \"2026-01-01T00:00:00Z\",\n \"config\": {\n \"eligibility\": {},\n \"obligations\": {\n \"mappings\": [\n {\n \"key\": \"platform\",\n \"name\": \"<string>\",\n \"kind\": \"service_period\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"allocation\": {\n \"catalog_price_fallback\": true\n },\n \"recognition\": {\n \"consumption\": {\n \"breakage\": \"recognize_at_expiry\"\n },\n \"default_accounts\": {\n \"deferred_revenue_ledger_account_id\": \"<string>\",\n \"unbilled_revenue_ledger_account_id\": \"<string>\"\n }\n },\n \"review\": {},\n \"modifications\": {}\n },\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "rpol_3fJ8kZx1Lq9a2B",
"ledger_id": "led_8Hq2nZ0kLm4x1P",
"name": "Enterprise contracts",
"description": "<string>",
"priority": 10,
"match_conditions": {
"customer_ids": [
"<string>"
],
"currencies": [
"EUR"
],
"countries": [
"FR"
],
"product_ids": [
"<string>"
],
"customer_segment_ids": [
"seg_7Gk2Lm9xQ1z4Ha"
],
"custom_property_filters": [
{
"custom_field_id": "cfi_9xQ1z4Ha7Gk2Lm",
"values": [
"enterprise"
]
}
]
},
"published_version": {
"id": "rpv_7Gk2Lm9xQ1z4Ha",
"version": 1,
"status": "draft",
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {
"collectability": "assumed"
},
"obligations": {
"mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"treatment": "allocated",
"granularity": "day",
"product_ids": [
"<string>"
]
}
],
"unmapped_products": "own_obligation"
},
"allocation": {
"method": "relative_ssp",
"catalog_price_fallback": true,
"discounts": "proportional"
},
"recognition": {
"consumption": {
"breakage": "recognize_at_expiry"
},
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {
"mode": "exceptions_and_overrides"
},
"modifications": {
"amendment": "prospective",
"cancellation": "prospective"
}
},
"published_at": "2024-12-20T16:04:11Z",
"published_by_user_id": "<string>",
"created_at": "2024-12-20T16:04:11Z"
},
"draft_version": {
"id": "rpv_7Gk2Lm9xQ1z4Ha",
"version": 1,
"status": "draft",
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {
"collectability": "assumed"
},
"obligations": {
"mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"treatment": "allocated",
"granularity": "day",
"product_ids": [
"<string>"
]
}
],
"unmapped_products": "own_obligation"
},
"allocation": {
"method": "relative_ssp",
"catalog_price_fallback": true,
"discounts": "proportional"
},
"recognition": {
"consumption": {
"breakage": "recognize_at_expiry"
},
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {
"mode": "exceptions_and_overrides"
},
"modifications": {
"amendment": "prospective",
"cancellation": "prospective"
}
},
"published_at": "2024-12-20T16:04:11Z",
"published_by_user_id": "<string>",
"created_at": "2024-12-20T16:04:11Z"
},
"assessment_count": 123,
"archived_at": "2024-12-20T16:04:11Z",
"created_at": "2024-12-20T16:04:11Z",
"versions": [
{
"id": "rpv_7Gk2Lm9xQ1z4Ha",
"version": 1,
"status": "draft",
"effective_from": "2026-01-01T00:00:00Z",
"config": {
"eligibility": {
"collectability": "assumed"
},
"obligations": {
"mappings": [
{
"key": "platform",
"name": "<string>",
"kind": "service_period",
"treatment": "allocated",
"granularity": "day",
"product_ids": [
"<string>"
]
}
],
"unmapped_products": "own_obligation"
},
"allocation": {
"method": "relative_ssp",
"catalog_price_fallback": true,
"discounts": "proportional"
},
"recognition": {
"consumption": {
"breakage": "recognize_at_expiry"
},
"default_accounts": {
"deferred_revenue_ledger_account_id": "<string>",
"unbilled_revenue_ledger_account_id": "<string>"
}
},
"review": {
"mode": "exceptions_and_overrides"
},
"modifications": {
"amendment": "prospective",
"cancellation": "prospective"
}
},
"published_at": "2024-12-20T16:04:11Z",
"published_by_user_id": "<string>",
"created_at": "2024-12-20T16:04:11Z"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}
